lightning router overview
2021-12-02 ยท 2 min read
Lightning-enabled "Captive Portal"
"Pay-as-you-go" internet usage with Lightning
Thesis #
Faster, cheaper micro-payments enable finer grained usage billing
Use Cases #
- Cafe / Restaurant / Hotel / Airport
- Appartment: provide WiFi to neighbors
What is Purchased (Capacity vs Volume) #
One of:
- Data Volume + Users purchase a "data rate" contract, e.g., $0.01 / MiB, charged every X MiB + Most cost efficient (?), since users pay only for what they use + Provider can charge many users at once + Variable quality, since it makes no guarantees about how much bandwidth capacity you're getting + Good for: emails, browsing, "spiky" usage
- Bandwidth + Users purchase a "bandwidth capacity" contract, e.g., 10 MiB/s, charged every X minutes + Allows users to reserve a "slice of the pipe" all to themselves + Some use cases aren't usable without a minimum bandwidth guarantee (Youtube video buffering, gaming lag). Most useful when the router is under heavy usage by many "data volume" users. + Good for: gaming, Netflix, Youtube, sustained usage
- Could also provide "slow" connectivity by default, then users pay for better quality.
- Also need to distinguish Up/Down Volume/Bandwidth
Captive Portal #
Flow #
custom auth variables passed in query string
variable | notes |
---|---|
clientip | The ip address of the client to be authenticated |
sessionlength | length of session - minutes |
uploadrate | maximum allowed upload data rate - kbits/sec |
downloadrate | maximum allowed download data rate - kbits/sec |
uploadquota | allowed upload data quota - kBytes |
downloadquota | allowed download data quota - kBytes |
custom | A custom data string that will be sent to BinAuth |
- client gets captured by openNDS
- openNDS redirects client to FAS API along w/ encrypted token (?) (depends on "security level")
- FAS API decides whether to auth client by passing them the decrypted token, client hits
gateway:port/opennds_auth?tok=XXX
with decrypted token to auth. - if client follows lightning flow, FAS API can notify openNDS to increase client